package com.itheima.test4;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

/**
 * @Author:gy
 * @Date: 2025/08/31 11:55
 * @Description:
 */
public class Demo2 {
    public static void main(String[] args) throws Exception {
        FileInputStream fis = new FileInputStream("D:\\班级\\93期\\day11-IO\\a.txt");
        FileOutputStream fos = new FileOutputStream("Day11\\cc.txt");
        byte[] bytes = new byte[1024];
        int len;
        while ((len = fis.read(bytes)) != -1) {
            fos.write(new String(bytes, 0, len,"GBK").getBytes());
           // System.out.println(new String(bytes, 0, len,"GBK"));
        }
        fis.close();
        fos.close();
    }
}
